//---------------------------------------------------------------------------

#ifndef ShipmentDetailsDlgH
#define ShipmentDetailsDlgH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <ExtCtrls.hpp>

#include "GlassesBridge.h"
#include "Error.h"
//---------------------------------------------------------------------------
class TfrmShipmentDetailsDlg : public TForm
{
__published:	// IDE-managed Components
        TPanel *pnlMain;
        TLabel *lblModel;
        TLabel *lblFirm;
        TLabel *lblAmount;
        TComboBox *cmbFirms;
        TComboBox *cmbModels;
        TEdit *edtAmount;
        TBitBtn *btnOk;
        TBitBtn *btnCancel;
        TBitBtn *btnHelp;
        void __fastcall cmbFirmsChange(TObject *Sender);
        void __fastcall FormDestroy(TObject *Sender);
        void __fastcall btnOkClick(TObject *Sender);
private:	// User declarations

        TGlassesBridge * bridge;

        TStrings * details;

        void FillFirmsCombo();
        void FillModelsCombo();

        void ValidateData();
        void HandleError( TError * e);


public:		// User declarations
        __fastcall TfrmShipmentDetailsDlg(TComponent* Owner);

        __fastcall TfrmShipmentDetailsDlg(TComponent* Owner, TDatabase* dbMain, TStrings * details);
};
#endif
